#ifndef _NETSER_H_
#define _NETSER_H_

#include <cstring>
#include <iostream>
#include <thread>

class netser {
    private:
	int ser_fd;
	int ser_port;
	bool running = false;
	std::thread handle;

    public:
	netser(int port);
	~netser();
	int send(char* buf, size_t len, struct sockaddr_in* addr);
	int recv(char* buf, size_t size, struct sockaddr_in* addr);
	int start();
	int stop();
	void thread();
};

#endif // _NETSER_H_
